﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace RN.ERP.Web.UserControl
{
    /// <summary>
    /// 注意事项
    /// 可以考虑后期将注意事项存放到数据库中，从数据库中查询
    /// </summary>
    public partial class UCRemark : System.Web.UI.UserControl
    {
        public List<string> RemarkList { get; set; }
        protected void Page_Load(object sender, EventArgs e)
        {
            BindData();
        }

        private void BindData()
        {
            DataTable dt = new DataTable();
            DataColumn col = new DataColumn("title");
            dt.Columns.Add(col);
            foreach (var remark in RemarkList)
            {
                DataRow row = dt.NewRow();
                row["title"] = remark;
                dt.Rows.Add(row);
            }
            rptRemark.DataSource = dt;
            rptRemark.DataBind();
        }
    }
}